/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.front.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.CrudService;
import com.thinkgem.jeesite.modules.front.dao.FrontUserDao;
import com.thinkgem.jeesite.modules.front.entity.FrontUser;

/**
 * 用户管理Service
 * @author 朱俊吉
 * @version 2017-11-25
 */
@Service
@Transactional(readOnly = true)
public class FrontUserService extends CrudService<FrontUserDao, FrontUser> {

	public FrontUser get(String id) {
		return super.get(id);
	}
	
	public List<FrontUser> findList(FrontUser frontUser) {
		return super.findList(frontUser);
	}
	
	public Page<FrontUser> findPage(Page<FrontUser> page, FrontUser frontUser) {
		return super.findPage(page, frontUser);
	}
	
	@Transactional(readOnly = false)
	public void save(FrontUser frontUser) {
		super.save(frontUser);
	}
	
	@Transactional(readOnly = false)
	public void delete(FrontUser frontUser) {
		super.delete(frontUser);
	}
	
	public FrontUser getUserByAccount(String account) {
		return dao.getUserByAccount(new FrontUser(null, account));
	}
	
}